Skip to content

CPU

Alt text

Von Neumann model

  • In the mid-1940s, John Von Neumann developed the concept of the stored program computer.
  • It has been the basis of computer architecture for many years.
  • The main, previously unavailable, features of the Von Neumann architecture were
    • a central processing unit (CPU or processor)
    • a processor able to access the memory directly
    • computer memories that could store programs as well as data
    • stored programs made up of instructions that could be executed in sequential order.

Alt text

  • The main components of the processor are the arithmetic logic unit (ALU), the control unit (CU), the system clock and the immediate access store (IAS).
  • The ALU allows the required arithmetic or logic operations to be carried out while a program is being run.
  • The accumulator (ACC) is a temporary register used when carrying out ALU calculations.
  • The CU reads an instruction from memory (the address of the location where the instruction can be found is stored in the program counter (PC)).
  • A system clock is used to produce timing signals on the control bus to ensure this vital synchronisation takes place – without the clock the computer would simply crash.
  • The IAS holds all the data and programs that the processor (CPU) needs to access. The CPU takes data and programs held in backing store and puts them into the IAS temporarily. The IAS is another name for primary (RAM) memory.

CPU

The main part of Von Neumann model?

[0/2]

CPU

The accumulator is a temporary register used when carrying out ALU calculations

[0/1]

CPU

The allows the required arithmetic or logic operations to be carried out while a program is being run

[0/1]

CPU

The holds all the data and programs that the processor (CPU) needs to access.

[0/1]

Register

  • One of the most fundamental components of the Von Neumann system is the register.
  • Registers can be general purpose or special purpose.
  • General purpose registers hold data that is frequently used by the CPU or can be used by the programmer when addressing the CPU directly.
  • Special purpose registers have a specific function within the CPU and hold the program state.
RegisterAbbreviationFunction/purpose of register
current instruction registerCIRstores the current instruction being decoded and executed
index registerIXused when carrying out index addressing operations (assembly code)
memory address registerMARstores the address of the memory location currently being read from or written to
memory data registerMDRstores data which has just been read from memory or data which is about to be written to memory (sometimes referred to as MBR)
program counterPCstores the address where the next instruction to be read can be found
status registerSRcontain bits which can be set or cleared depending on the operation (for example, to indicate overflow in a calculation)

CPU

The stores the current instruction being decoded and executed.

[0/1]

CPU

The stores the address where the next instruction to be read can be found

[0/1]

CPU

The contains bits which can be set or cleared depending on the operation

[0/1]

CPU

The used when carrying out index addressing operations (assembly code)

[0/1]

System buses

  • System buses are used in computers as a parallel transmission component; each wire in the bus transmits one bit of data.
  • There are three common buses used in the Von Neumann architecture known as address bus, data bus and control bus.

Alt text

Type of busDescription of busDirection
Address busCarries signals relating to addressesUnidirectional
Data busCarries dataBi-directional
Control busCarries signals relating to the controlBi-directional

CPU

The carries signals relating to addresses

[0/1]

How to improve computer performance

  • increasing bus width increases the performance and speed of a computer system
  • increasing clock speed usually increases the speed of a computer
  • use of multi-core CPUs
  • use of cache memories can also speed up a processor’s performance.

Alt text

CPU

How to improve computer performance?

[0/2]

Computer ports

  • Input and output devices are connected to a computer via ports.
  • The Universal Serial Bus (USB) is an asynchronous serial data transmission method. It has quickly become the standard method for transferring data between a computer and a number of devices.
  • High-definition multimedia interface (HDMI) ports allow output (both audio and visual) from a computer to an HDMI-enabled device. It uses high-bandwidth digital copy protection (HDCP). HDCP uses a type of authentication protocol.
  • Video Graphics Array (VGA) was introduced at the end of the 1980s. VGA supports 640 × 480 pixel resolution on a television or monitor screen. It can also handle a refresh rate of up to 60Hz (60 frames a second) provided there are only 16 different colours being used.

Alt text

Universal Serial Bus (USB)

Alt text

HDMI & VGA

Alt text

USB

Which is the advantage of USB?

[0/2]
USB

HDMI

Which is the advantage of HDMI?

[0/2]
HDMI

VGA

Which is the advantage of VGA?

[0/2]
VGA

Fetch-execute cycle

  • To execute a set of instructions, the processor first fetches data and instructions from memory and stores them in suitable registers.
  • Once this is done, each instruction needs to be decoded before being executed.

Fetch

  • The next instruction is fetched from the memory address currently stored in the program counter (PC) and is then stored in the current instruction register (CIR).
  • The PC is then incremented (increased by 1) so that the next instruction can be processed.
  • This is decoded so that each instruction can be interpreted in the next part of the cycle.

Execute

  • The processor passes the decoded instruction as a set of control signals to the appropriate components within the computer system.
  • This allows each instruction to be carried out in its logical sequence.

Register Transfer Notation (RTN)

  • When registers are involved, it is possible to describe what is happening by using Register Transfer Notation (RTN).

  • In its simplest form:

    1. MAR ← [PC] contents of PC copied into MAR

    2. [PC] ← [PC] + 1 PC is incremented by 1

    3. MDR ← [[MAR]] data stored at address shown in MAR is copied into MDR

    4. CIR ← [MDR] contents of MDR copied into CIR

Alt text

Fetch

Register Transfer Notation (RTN) for fetch-execute cycle:

  1. ← [] contents of PC copied into MAR
  2. [] ← [] + 1 PC is incremented by 1
  3. ← [[]] data stored at address shown in MAR is copied into MDR
  4. ← [] contents of MDR copied into CIR
[0/4]
Fetch

Interrupts

  • An interrupt is a signal sent from a device or from software to the processor.

  • This will cause the processor to temporarily stop what it is doing and service the interrupt.

  • Interrupts can be caused by, for example

    • a timing signal
    • input/output processes
    • a hardware
    • a software error
  • Once the interrupt signal is received, the processor either carries on with what it was doing or stops to service the device/program that generated the interrupt.

  • The computer needs to identify the interrupt type and also establish the level of interrupt priority.

Use of interrupts in the fetch-execute cycle

Alt text

Interrupt

Interrupts can be caused by, for example:

[0/2]
Interrupt